package nil.ed.lazy.io.utils.output;

import java.io.IOException;
import java.io.OutputStream;

/**
 * 从common-io包中复制
 * This OutputStream writes all data to the famous <b>/dev/null</b>.
 * <p>
 * This output stream has no destination (file/socket etc.) and all
 * bytes written to it are ignored and lost.
 *
 * @author Jeremias Maerki
 * @version $Id: NullOutputStream.java 437567 2006-08-28 06:39:07Z bayard $
 */
public class NullOutputStream extends OutputStream {

    /**
     * @see java.io.OutputStream#write(byte[], int, int)
     */
    @Override
    public void write(byte[] b, int off, int len) {
        //to /dev/null
    }

    /**
     * @see java.io.OutputStream#write(int)
     */
    @Override
    public void write(int b) {
        //to /dev/null
    }

    /**
     * @see java.io.OutputStream#write(byte[])
     */
    @Override
    public void write(byte[] b) throws IOException {
        //to /dev/null
    }
}